﻿<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
  
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class ConcurrentHashSet&lt;T&gt;
   </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class ConcurrentHashSet&lt;T&gt;
   ">
    <meta name="generator" content="docfx 2.40.12.0">
    
    <link rel="shortcut icon" href="../images/favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">
    
    <meta property="docfx:rel" content="../">
    
  </head>
  <body data-spy="scroll" data-target="#affix" data-offset="120">
    <div id="wrapper">
      <header>
        
        <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
          <div class="container">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              
              <a class="navbar-brand" href="../index.html">
                <img id="logo" class="svg" src="../images/logo.svg" alt="">
              </a>
            </div>
            <div class="collapse navbar-collapse" id="navbar">
              <form class="navbar-form navbar-right" role="search" id="search">
                <div class="form-group">
                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
                </div>
              </form>
            </div>
          </div>
        </nav>
        
        <div class="subnav navbar navbar-default">
          <div class="container hide-when-search" id="breadcrumb">
            <ul class="breadcrumb">
              <li></li>
            </ul>
          </div>
        </div>
      </header>
      <div class="container body-content">
        
        <div id="search-results">
          <div class="search-list"></div>
          <div class="sr-items">
            <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
          </div>
          <ul id="pagination"></ul>
        </div>
      </div>
      <div role="main" class="container body-content hide-when-search">
        
        <div class="sidenav hide-when-search">
          <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
          <div class="sidetoggle collapse" id="sidetoggle">
            <div id="sidetoc"></div>
          </div>
        </div>
        <div class="article row grid-right">
          <div class="col-md-10">
            <article class="content wrap" id="_content" data-uid="ConcurrentCollections.ConcurrentHashSet`1">
  
  
  <h1 id="ConcurrentCollections_ConcurrentHashSet_1" data-uid="ConcurrentCollections.ConcurrentHashSet`1" class="text-break">Class ConcurrentHashSet&lt;T&gt;
  </h1>
  <div class="markdown level0 summary"><p>Represents a thread-safe hash-based unique collection.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><span class="xref">System.Object</span></div>
    <div class="level1"><span class="xref">ConcurrentHashSet&lt;T&gt;</span></div>
  </div>
  <div classs="implements">
    <h5>Implements</h5>
    <div><span class="xref">ICollection</span>&lt;T&gt;</div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="ConcurrentCollections.html">ConcurrentCollections</a></h6>
  <h6><strong>Assembly</strong>: Mapsui.dll</h6>
  <h5 id="ConcurrentCollections_ConcurrentHashSet_1_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class ConcurrentHashSet&lt;T&gt; : IReadOnlyCollection&lt;T&gt;, ICollection&lt;T&gt;</code></pre>
  </div>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">T</span></td>
        <td><p>The type of the items in the collection.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 id="ConcurrentCollections_ConcurrentHashSet_1_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>All public members of <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a> are thread-safe and may be used
concurrently from multiple threads.</p>
</div>
  <h3 id="constructors">Constructors
  </h3>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1__ctor.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.%23ctor%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L106">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1__ctor_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1__ctor" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor">ConcurrentHashSet()</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>
class that is empty, has the default concurrency level, has the default initial capacity, and
uses the default comparer for the item type.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public ConcurrentHashSet()</code></pre>
  </div>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1__ctor_IEnumerable__0__.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.%23ctor(IEnumerable%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L142">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1__ctor_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1__ctor_IEnumerable__0__" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor(IEnumerable{`0})">ConcurrentHashSet(IEnumerable&lt;T&gt;)</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>
class that contains elements copied from the specified <span class="xref">System.Collections.IEnumerable{T}</span>, has the default concurrency
level, has the default initial capacity, and uses the default comparer for the item type.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public ConcurrentHashSet(IEnumerable&lt;T&gt; collection)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">IEnumerable</span>&lt;T&gt;</td>
        <td><span class="parametername">collection</span></td>
        <td><p>The <span class="xref">System.Collections.IEnumerable{T}</span> whose elements are copied to
the new
<a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.ArgumentNullException</span></td>
        <td><p><code data-dev-comment-type="paramref" class="paramref">collection</code> is a null reference.</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1__ctor_IEnumerable__0__IEqualityComparer__0__.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.%23ctor(IEnumerable%7B%600%7D%2CIEqualityComparer%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L175">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1__ctor_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1__ctor_IEnumerable__0__IEqualityComparer__0__" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor(IEnumerable{`0},IEqualityComparer{`0})">ConcurrentHashSet(IEnumerable&lt;T&gt;, IEqualityComparer&lt;T&gt;)</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>
class that contains elements copied from the specified <span class="xref">System.Collections.IEnumerable</span>, has the default concurrency level, has the default
initial capacity, and uses the specified
<span class="xref">System.Collections.Generic.IEqualityComparer{T}</span>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public ConcurrentHashSet(IEnumerable&lt;T&gt; collection, IEqualityComparer&lt;T&gt; comparer)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">IEnumerable</span>&lt;T&gt;</td>
        <td><span class="parametername">collection</span></td>
        <td><p>The <span class="xref">System.Collections.IEnumerable{T}</span> whose elements are copied to
the new
<a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">IEqualityComparer</span>&lt;T&gt;</td>
        <td><span class="parametername">comparer</span></td>
        <td><p>The <span class="xref">System.Collections.Generic.IEqualityComparer{T}</span>
implementation to use when comparing items.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.ArgumentNullException</span></td>
        <td><p><code data-dev-comment-type="paramref" class="paramref">collection</code> is a null reference
    (Nothing in Visual Basic).</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1__ctor_IEqualityComparer__0__.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.%23ctor(IEqualityComparer%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L154">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1__ctor_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1__ctor_IEqualityComparer__0__" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor(IEqualityComparer{`0})">ConcurrentHashSet(IEqualityComparer&lt;T&gt;)</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>
class that is empty, has the specified concurrency level and capacity, and uses the specified
<span class="xref">System.Collections.Generic.IEqualityComparer{T}</span>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public ConcurrentHashSet(IEqualityComparer&lt;T&gt; comparer)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">IEqualityComparer</span>&lt;T&gt;</td>
        <td><span class="parametername">comparer</span></td>
        <td><p>The <span class="xref">System.Collections.Generic.IEqualityComparer{T}</span>
implementation to use when comparing items.</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1__ctor_System_Int32_IEnumerable__0__IEqualityComparer__0__.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.%23ctor(System.Int32%2CIEnumerable%7B%600%7D%2CIEqualityComparer%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L202">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1__ctor_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1__ctor_System_Int32_IEnumerable__0__IEqualityComparer__0__" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor(System.Int32,IEnumerable{`0},IEqualityComparer{`0})">ConcurrentHashSet(Int32, IEnumerable&lt;T&gt;, IEqualityComparer&lt;T&gt;)</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a> 
class that contains elements copied from the specified <span class="xref">System.Collections.IEnumerable</span>, 
has the specified concurrency level, has the specified initial capacity, and uses the specified 
<span class="xref">System.Collections.Generic.IEqualityComparer{T}</span>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public ConcurrentHashSet(int concurrencyLevel, IEnumerable&lt;T&gt; collection, IEqualityComparer&lt;T&gt; comparer)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td><span class="parametername">concurrencyLevel</span></td>
        <td><p>The estimated number of threads that will update the 
<a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a> concurrently.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">IEnumerable</span>&lt;T&gt;</td>
        <td><span class="parametername">collection</span></td>
        <td><p>The <span class="xref">System.Collections.IEnumerable{T}</span> whose elements are copied to the new 
<a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">IEqualityComparer</span>&lt;T&gt;</td>
        <td><span class="parametername">comparer</span></td>
        <td><p>The <span class="xref">System.Collections.Generic.IEqualityComparer{T}</span> implementation to use 
when comparing items.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.ArgumentNullException</span></td>
        <td><p><code data-dev-comment-type="paramref" class="paramref">collection</code> is a null reference.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.ArgumentOutOfRangeException</span></td>
        <td><p><code data-dev-comment-type="paramref" class="paramref">concurrencyLevel</code> is less than 1.</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1__ctor_System_Int32_System_Int32_.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.%23ctor(System.Int32%2CSystem.Int32)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L126">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1__ctor_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1__ctor_System_Int32_System_Int32_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor(System.Int32,System.Int32)">ConcurrentHashSet(Int32, Int32)</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>
class that is empty, has the specified concurrency level and capacity, and uses the default
comparer for the item type.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public ConcurrentHashSet(int concurrencyLevel, int capacity)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td><span class="parametername">concurrencyLevel</span></td>
        <td><p>The estimated number of threads that will update the
<a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a> concurrently.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td><span class="parametername">capacity</span></td>
        <td><p>The initial number of elements that the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>
can contain.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.ArgumentOutOfRangeException</span></td>
        <td><p><code data-dev-comment-type="paramref" class="paramref">concurrencyLevel</code> is
    less than 1.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.ArgumentOutOfRangeException</span></td>
        <td><p><code data-dev-comment-type="paramref" class="paramref">capacity</code> is less than
   0.</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1__ctor_System_Int32_System_Int32_IEqualityComparer__0__.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.%23ctor(System.Int32%2CSystem.Int32%2CIEqualityComparer%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L226">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1__ctor_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1__ctor_System_Int32_System_Int32_IEqualityComparer__0__" data-uid="ConcurrentCollections.ConcurrentHashSet`1.#ctor(System.Int32,System.Int32,IEqualityComparer{`0})">ConcurrentHashSet(Int32, Int32, IEqualityComparer&lt;T&gt;)</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>
class that is empty, has the specified concurrency level, has the specified initial capacity, and
uses the specified <span class="xref">System.Collections.Generic.IEqualityComparer{T}</span>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public ConcurrentHashSet(int concurrencyLevel, int capacity, IEqualityComparer&lt;T&gt; comparer)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td><span class="parametername">concurrencyLevel</span></td>
        <td><p>The estimated number of threads that will update the
<a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a> concurrently.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td><span class="parametername">capacity</span></td>
        <td><p>The initial number of elements that the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>
can contain.</p>
</td>
      </tr>
      <tr>
        <td><span class="xref">IEqualityComparer</span>&lt;T&gt;</td>
        <td><span class="parametername">comparer</span></td>
        <td><p>The <span class="xref">System.Collections.Generic.IEqualityComparer{T}</span>
implementation to use when comparing items.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.ArgumentOutOfRangeException</span></td>
        <td><p><code data-dev-comment-type="paramref" class="paramref">concurrencyLevel</code> is less than 1. -or-
<code data-dev-comment-type="paramref" class="paramref">capacity</code> is less than 0.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
  </h3>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1_Count.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.Count%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L45">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1_Count_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.Count*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1_Count" data-uid="ConcurrentCollections.ConcurrentHashSet`1.Count">Count</h4>
  <div class="markdown level1 summary"><p>Gets the number of items contained in the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public int Count { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Int32</span></td>
        <td><p>The number of items contained in the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 id="ConcurrentCollections_ConcurrentHashSet_1_Count_remarks">Remarks</h5>
  <div class="markdown level1 remarks"><p>Count has snapshot semantics and represents the number of items in the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>
at the moment when Count was accessed.</p>
</div>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1_IsEmpty.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.IsEmpty%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L74">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1_IsEmpty_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.IsEmpty*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1_IsEmpty" data-uid="ConcurrentCollections.ConcurrentHashSet`1.IsEmpty">IsEmpty</h4>
  <div class="markdown level1 summary"><p>Gets a value that indicates whether the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a> is empty.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool IsEmpty { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Boolean</span></td>
        <td><p>true if the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a> is empty; otherwise,
false.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
  </h3>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1_Add__0_.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.Add(%600)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L266">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1_Add_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.Add*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1_Add__0_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.Add(`0)">Add(T)</h4>
  <div class="markdown level1 summary"><p>Adds the specified item to the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool Add(T item)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">T</span></td>
        <td><span class="parametername">item</span></td>
        <td><p>The item to add.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Boolean</span></td>
        <td><p>true if the items was added to the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>
successfully; false if it already exists.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.OverflowException</span></td>
        <td><p>The <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>
contains too many items.</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1_Clear.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.Clear%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L272">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1_Clear_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.Clear*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1_Clear" data-uid="ConcurrentCollections.ConcurrentHashSet`1.Clear">Clear()</h4>
  <div class="markdown level1 summary"><p>Removes all items from the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void Clear()</code></pre>
  </div>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1_Contains__0_.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.Contains(%600)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L295">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1_Contains_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.Contains*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1_Contains__0_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.Contains(`0)">Contains(T)</h4>
  <div class="markdown level1 summary"><p>Determines whether the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a> contains the specified
item.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool Contains(T item)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">T</span></td>
        <td><span class="parametername">item</span></td>
        <td><p>The item to locate in the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Boolean</span></td>
        <td><p>true if the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a> contains the item; otherwise, false.</p>
</td>
      </tr>
    </tbody>
  </table>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1_GetEnumerator.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.GetEnumerator%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L381">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1_GetEnumerator_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.GetEnumerator*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1_GetEnumerator" data-uid="ConcurrentCollections.ConcurrentHashSet`1.GetEnumerator">GetEnumerator()</h4>
  <div class="markdown level1 summary"><p>Returns an enumerator that iterates through the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IEnumerator&lt;T&gt; GetEnumerator()</code></pre>
  </div>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">IEnumerator</span>&lt;T&gt;</td>
        <td><p>An enumerator for the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 id="ConcurrentCollections_ConcurrentHashSet_1_GetEnumerator_remarks">Remarks</h5>
  <div class="markdown level1 remarks"><p>The enumerator returned from the collection is safe to use concurrently with
reads and writes to the collection, however it does not represent a moment-in-time snapshot
of the collection.  The contents exposed through the enumerator may contain modifications
made to the collection after <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html#ConcurrentCollections_ConcurrentHashSet_1_GetEnumerator">GetEnumerator()</a> was called.</p>
</div>
  <span class="small pull-right mobile-hide">
    <span class="divider">|</span>
    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1_TryRemove__0_.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601.TryRemove(%600)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  </span>
  <span class="small pull-right mobile-hide">
    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L325">View Source</a>
  </span>
  <a id="ConcurrentCollections_ConcurrentHashSet_1_TryRemove_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.TryRemove*"></a>
  <h4 id="ConcurrentCollections_ConcurrentHashSet_1_TryRemove__0_" data-uid="ConcurrentCollections.ConcurrentHashSet`1.TryRemove(`0)">TryRemove(T)</h4>
  <div class="markdown level1 summary"><p>Attempts to remove the item from the <a class="xref" href="ConcurrentCollections.ConcurrentHashSet-1.html">ConcurrentHashSet&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool TryRemove(T item)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">T</span></td>
        <td><span class="parametername">item</span></td>
        <td><p>The item to remove.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Boolean</span></td>
        <td><p>true if an item was removed successfully; otherwise, false.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="implements">Implements</h3>
  <div>
      <span class="xref">ICollection&lt;&gt;</span>
  </div>
</article>
          </div>
          
          <div class="hidden-sm col-md-2" role="complementary">
            <div class="sideaffix">
              <div class="contribution">
                <ul class="nav">
                  <li>
                    <a href="https://github.com/Mapsui/Mapsui/new/master/apiSpec/new?filename=ConcurrentCollections_ConcurrentHashSet_1.md&amp;value=---%0Auid%3A%20ConcurrentCollections.ConcurrentHashSet%601%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
                  </li>
                  <li>
                    <a href="https://github.com/Mapsui/Mapsui/blob/master/Mapsui/Utilities/ConcurrentHashSet.cs/#L22" class="contribution-link">View Source</a>
                  </li>
                </ul>
              </div>
              <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
              <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
              </nav>
            </div>
          </div>
        </div>
      </div>
      
      <footer>
        <div class="grad-bottom"></div>
        <div class="footer">
          <div class="container">
            <span class="pull-right">
              <a href="#top">Back to top</a>
            </span>
            
            <span>Generated by <strong>DocFX</strong></span>
          </div>
        </div>
      </footer>
    </div>
    
    <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
    <script type="text/javascript" src="../styles/docfx.js"></script>
    <script type="text/javascript" src="../styles/main.js"></script>
  </body>
</html>
